﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cms.Core.Infrastructure.Extension
{
  public   static class GuidExtensions
    {


        /// <summary>
        /// 是否空或者Null
        /// </summary>
        /// <param name="guid"></param>
        /// <returns></returns>
        public static bool IsEmptyOrNull(this Guid guid) => guid == null || guid == Guid.Empty;

        public static bool IsEmptyOrNullOrHasValue(this Guid? guid) => guid == null || guid == Guid.Empty || !guid.HasValue;
    }
}
